! Configuration File for keepalived

global_defs {
   notification_email {
     acassen@firewall.loc
     failover@firewall.loc
     sysadmin@firewall.loc
   }
   notification_email_from Alexandre.Cassen@firewall.loc
   smtp_server 192.168.200.1
   smtp_connect_timeout 30
   router_id LVS_DEVEL
}

vrrp_script check_apiserver {
    script "/etc/keepalived/check_apiserver.sh"
    interval 3
    timeout 10
    fall 5
    rise 2
    weight -2
    }

    vrrp_instance VI_1 {
        state BACKUP
        interface {{ bind_interface }}
        virtual_router_id 1
        priority 100
        advert_int 5
        authentication {
            auth_type PASS
            auth_pass {{ keepalived_secret }}
        }
        virtual_ipaddress {
            {{ vip }}
        }
        track_script {
            check_apiserver
        }
    }